import React, { PureComponent } from "react";
import { connect } from "react-redux";

import { fetchDataAction } from "../store/home/actionCreators";

export class Category extends PureComponent {
  componentDidMount() {
    const { fetchData } = this.props;
    fetchData();
  }
  render() {
    return <div>Category</div>;
  }
}

const mapDispatchToProps = (dispatch) => {
  return {
    fetchData: () => {
      dispatch(fetchDataAction());
    },
  };
};

export default connect(null, mapDispatchToProps)(Category);
